import apis from '../../http/apis/apis.js'
import register from "../../http/apis/modules/register.js"


export default {
    //避免命名冲突
    namespaced: true,
    state: {
        access: false,
    },

    mutations: {
        changeAccess(state, val) {
            state.access = val;
        }
    },
    actions: {
        // 获取出租方数据
        async isAccess(context, account) {
            const { data } = await apis.register.isAccess(account);
            console.log(data)
            context.commit("changeAccess", data.status)
        },
        // 出租方注册
        async register(context, lessors) {
            const { data } = await apis.register.register(lessors);
            console.log(data)
            // context.commit("changeAccess", data.status)
        }
    }
}